package homework;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

import com.example.rumen.R;

public class SelectConfirm extends AppCompatActivity {
    private TextView schoolText;
    private TextView majorLabelText;
    private TextView supervisorText;
    private Button back;
    private Button confirm;
    @SuppressLint("MissingInflatedId")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_select_confirm);
        ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
            Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
            v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
            return insets;
        });



        schoolText = findViewById(R.id.schoolText);
        majorLabelText = findViewById(R.id.majorText);
        supervisorText = findViewById(R.id.supervisorText);
        back = findViewById(R.id.backButton);
        confirm = findViewById(R.id.confirmButton);

        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getApplicationContext(), selectSchool.class);
                startActivity(intent);
            }
        });
        confirm.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getApplicationContext(), successPage.class);
                startActivity(intent);
            }
        });
        schoolText.setText(getIntent().getStringExtra("school"));
        majorLabelText.setText(getIntent().getStringExtra("zhuanye"));
        supervisorText.setText(getIntent().getStringExtra("teacher"));
    }



}